package com.ms.monitor.config;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;

import com.module.comm.constants.ConfigCons;
import com.ms.MsConfig;

@Configuration
public class MonitorConfig {

	//private final Logger LOGGER = LoggerFactory.getLogger(MonitorConfig.class);

	@Autowired
	private Environment env;
	
	@Bean
	public ConfigCons configCons() {
		ConfigCons cons = new ConfigCons();
		ConfigCons.projectName = env.getProperty("project.monitor.name");
		/*ConfigCons.clientId = env.getProperty("project.client.id");
		ConfigCons.sercret = env.getProperty("project.sercret");*/
		//ConfigCons.webroot = env.getProperty("project.webroot");
		
		MsConfig.setAuthInfo(env.getProperty("project.client.id"), env.getProperty("project.sercret"));
		return cons;
	}
}